
public class ShowCurrentTime{
public static void main(String[]args){
long totalMilliseconds=System.currentTimeMillis();
long totalSeconds=totalMilliseconds/1000;
long nowSeconds=totalSeconds%60;
long totalMinutes=totalSeconds/60;
long nowMinutes=totalMinutes%60;
long totalHours=totalMinutes/24;
long nowHours=totalHours%24;
System.out.println(nowHours + ":" + nowMinutes + ":" + nowSeconds);
}
}